package ai.text.impl.extractor;

public enum SentenceType {
	S("S","simple declarative clause, i.e. one that is not introduced by a (possible empty) subordinating conjunction or a wh-word and that does not exhibit subject-verb inversion."),
	SBAR("SBAR","Clause introduced by a (possibly empty) subordinating conjunction."),
	SBARQ("SBARQ","Direct question introduced by a wh-word or a wh-phrase. Indirect questions and relative clauses should be bracketed as SBAR, not SBARQ."),
	SINV("SINV","Inverted declarative sentence, i.e. one in which the subject follows the tensed verb or modal."),
	SQ("SQ","Inverted yes/no question, or main clause of a wh-question, following the wh-phrase in SBARQ.");
	
	private String code;
	private String name;
	
	private SentenceType(String code, String name) {
		this.code = code;
		this.name = name;
	}
	
	public SentenceType valueOfCode(String str) {
		for(SentenceType type: values()) {
			if(type.code.equals(str)) {
				return type;
			}
		}
		return null;
	}
	
}
